

import 'package:flutter/material.dart';
import 'package:myapp/page/messageTransfer/parent.dart';

class MessageTransfer extends StatelessWidget{

  const MessageTransfer({ super.key });

  @override
  Widget build(BuildContext context) {
    return SafeArea(
        child: Scaffold(
          appBar: AppBar(
            title: const Text(
              '参数传递',
              style: TextStyle(fontSize: 16),
            ),
            backgroundColor: Colors.white.withOpacity(0.5),
            centerTitle: true,
          ),
          body: SingleChildScrollView(
            child: Column(
              children: [
                Container(
                  width: double.infinity,
                  height: 100.0,
                  color: Colors.deepOrange,
                  child: const Text('头组件'),
                ),
                Container(
                  width: double.infinity,
                  padding: const EdgeInsets.all(10.0),
                  color: Colors.blue,
                  child: const Parent(),
                ),
              ],
            ),
          )
        )
    );
  }


}

// class _context extends State<Home> {
//
//   @override
//   Widget build(BuildContext context) {
//     return SafeArea(
//         child: Scaffold(
//             appBar: AppBar(
//               centerTitle: true,
//               backgroundColor: Colors.amberAccent,
//               title: Text(
//                 widget.title,
//                 style: const TextStyle(
//                   fontSize: 16.0,
//                 ),
//               ),
//             ),
//             body: Column(
//               mainAxisAlignment: MainAxisAlignment.spaceEvenly,
//               crossAxisAlignment: CrossAxisAlignment.center,
//               children: [
//                 const Text('111111111111111'),
//                 const Text('2222'),
//                 widget.child,
//               ],
//             ),
//         ),
//     );
//   }
//
// }